package org.gaaidou.ptarmigan.springboot.core.common;

import org.springframework.util.StringUtils;

public final class EnvUtil {
    public static String getValue(String key, String defaultValue) {
        String value = System.getenv(key);
        if (!StringUtils.hasText(value)) {
            return System.getProperty(key, defaultValue);
        } else {
            return value;
        }
    }
}
